﻿Public Class banhang
    Private DSSanPhamBS As DSSanPhamBS
    Private DSSanPhamGD As DSSanPhamGD

    Private Property HoaDonTamBS As HoaDonTamBS

    Private Sub banhang_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        LoadDGV_DSSanPham()
        LoadDGV_HoaDonTam()
    End Sub


    '----------------------- Load Các DGV
    Private Sub LoadDGV_DSSanPham()
        Dim DSSanPhamList As New List(Of DSSanPhamGD)
        DSSanPhamBS = New DSSanPhamBS
        DSSanPhamList = DSSanPhamBS.GetData()
        dgrvDSMatHang.DataSource = DSSanPhamList
        dgrvDSMatHang.ClearSelection()
    End Sub

    Private Sub LoadDGV_HoaDonTam()
        Dim HoaDonTamList As New List(Of HoaDonTamGD)
        HoaDonTamBS = New HoaDonTamBS
        HoaDonTamList = HoaDonTamBS.GetData()
        dgrvMatHangMua.DataSource = HoaDonTamList
        dgrvMatHangMua.ClearSelection()
    End Sub

    Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
        Me.Close()
    End Sub

    Private Sub dgrvMatHangMua_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles dgrvMatHangMua.CellContentClick

    End Sub
End Class